var myGoodsViewCtrl  = new XFApp.client();

XFApp.client.prototype.myGoodsView = {
	successCode : 10000,	
	
	convertData:function(){
		var _this = this;
		var currencyCode = $("#currency").attr("data-value");
		if(!!currencyCode){
			var currencys = dictCtrl.dictionary.translate("currency");//币制
			for(var index = 0;index<currencys.length;index++){
				var currency = currencys[index];
				if(currency.dictCode==currencyCode){
					$("#currency").html(currency.dictName);
					break;
				}
			}
		}
		var customsCodeData = $("#customscode").attr("data-value");
		if(!!customsCodeData){
			var customsCodes = dictCtrl.dictionary.translate("customsCode");//海关
			for(var index = 0;index<customsCodes.length;index++){
				var customsCode = customsCodes[index];
				if(customsCode.dictCode==customsCodeData){
					$("#customscode").html(customsCode.dictName);
					break;
				}
			}
		}
		
		var unitCode = $("#unit").attr("data-value");
		if(!!unitCode){
			var units = dictCtrl.dictionary.translate("measureUnit");//单位
			for(var index = 0;index<units.length;index++){
				var unit = units[index];
				if(unit.dictCode==unitCode){
					$("#unit").html(unit.dictName);
					break;
				}
			}
		}
		$("#docketstatus").text(goodsConstants.statusConts[$("#docketstatus").attr("data-value")]);
		
	}
}
$(function(){
	
	myGoodsViewCtrl.myGoodsView.convertData();
});